package geodata;

import ground.GroundType;

import java.util.Vector;

/**
 * A class that models the geology of a particular area
 * @author Stephan Jossie
 *
 */
@SuppressWarnings("serial")
public class GeologicalData extends GeoData
{
	/**
	 * Vector containing cross sections of the soil
	 */
	private Vector<GroundType> crossSections;
	
	/**
	 * Underground temperature
	 */
	private double groundTemperature;
	
//	/**
//	 * TODO don't know yet
//	 */
//	private double as;
//	/**
//	 * TODO don't know yet
//	 */
//	private double to;
//	/**
//	 * TODO don't know yet
//	 */
//	private double warmestDay;
//	/**
//	 * TODO don't know yet
//	 */
//	private double coldestDay;
	
	/**
	 * Creates a new geological data
	 */
	public GeologicalData()
	{
		this.addField(new Field<Double>(0.0d, "Warmest Day", "wd", null));
		this.addField(new Field<Double>(0.0d, "Coldest Day", "cd", null));
		this.addField(new Field<Double>(0.0d, "AS", "a", null));
		this.addField(new Field<Double>(0.0d, "TO", "t", null));
		this.addField(new Field<Double>(0.0d, "Ground Temp", "gt", null));
		
		crossSections = new Vector<GroundType>();
	}
	
//	/**
//	 * @return
//	 * Ground Temperature
//	 */
//	public double getGroundTemperature(){
//		return groundTemperature;
//	}
	
	/**
	 * Adds a layer to the bottom of the geological cross section.
	 * @param layer the layer of ground to add.
	 */
	public void addGroundType(GroundType layer)
	{
		crossSections.add(layer);
	}
	
	/**
	 * Removes the specified layer of ground from the cross section.
	 * If two layers of ground are equal, then the top-most layer will be
	 * removed.
	 * @param layer the layer to remove.
	 */
	public void removeGroundType(GroundType layer)
	{
		crossSections.remove(layer);
	}
	
	/**
	 * Removes a layer of ground at the specified 0-based index.
	 * @param index the index where the layer of ground is to be removed.
	 */
	public void removeGroundType(int index)
	{
		crossSections.remove(index);
	}
	
	/**
	 * Erase all cross sections
	 */
	public void clear()
	{
		crossSections.clear();
	}
	
	/**
	 * Adds a layer of ground to the specified index.  Any ground types
	 * at the index or greater than the index will be shifted down.
	 * @param layer the layer of ground to insert.
	 * @param index the index at which to insert the layer.
	 */
	public void insertGroundType(GroundType layer, int index)
	{
		crossSections.add(index, layer);
	}
	
	/**
	 * @return
	 * Cross sections of ground
	 */
	public Vector<GroundType> getCrossSections()
	{
		return crossSections;
	}

	@Override
	public void setMetric()
	{
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setStandard()
	{
		// TODO Auto-generated method stub
		
	}

//	/**
//	 * Setter to set ground temperature
//	 * @param temp
//	 * 		temperature to change ground temperature to
//	 */
//	public void setGroundTemp(double temp)
//	{
//		groundTemperature = temp;
//	}
//	
//	/**
//	 * @see geodata.GeoData#setMetric()
//	 */
//	public void setMetric() {
//
//	}
//
//	/**
//	 * @see geodata.GeoData#setStandard()
//	 */
//	public void setStandard() {
//
//	}
//
//	/**
//	 * Setter for changing AS
//	 * @param pAs
//	 * 		To change AS
//	 */
//	public void setAs(double pAs)
//	{
//		as = pAs;
//	}
//	
//	/**
//	 * Setter for changing TO
//	 * @param pTo
//	 * 		To change TO
//	 */
//	public void setTo(double pTo)
//	{
//		to = pTo;
//	}
//	
//	/**
//	 * Setter to set warmest day temp
//	 * @param warmest
//	 * 		Temperature
//	 */
//	public void setWarmestTemp(double warmest)
//	{
//		warmestDay = warmest;
//	}
//	
//	/**
//	 * Setter to set coldest day temp
//	 * @param coldest
//	 * 		Temperature
//	 */
//	public void setColdestTemp(double coldest)
//	{
//		coldestDay = coldest;
//	}
//	
//	/**
//	 * Getter for AS
//	 * @return
//	 * 		AS
//	 */
//	public double getAS()
//	{
//		return as;
//	}
//	
//	 /**
//	  * Getter for TO
//	 * @return
//	 * 		TO
//	 */
//	public double getTO()
//	{
//		return to;
//	}
//	
//	/**
//	 * Getter warmest day
//	 * @return
//	 * 		warmest temperature
//	 */
//	public double getWarmestDay()
//	{
//		return warmestDay;
//	}
//	
//	/**
//	 * Getter coldest day
//	 * @return
//	 * 		coldest temperature
//	 */
//	public double getColdestDay()
//	{
//		return coldestDay;
//	}
}
